﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ConsoleCalculator.ServiceReference;

namespace DotNetCalculator
{
    class Program
    {
        static void Main(string[] args)
        {
            ServiceClient proxy = new ServiceClient("BasicHttpBinding_Service");


            Console.WriteLine("Enter first number:");
            int a = int.Parse(Console.ReadLine());
            Console.WriteLine("Enter second number:");
            int b = int.Parse(Console.ReadLine());
            Console.WriteLine("Enter operation (Add/Subtract/Multiply/Divide):");
            string op = Console.ReadLine();

            Console.WriteLine("Equals:");

            int result = 0;
            switch(op)
            {
                case "Add": result = proxy.Calculate(Operation.Add, a, b); break;
                case "Subtract": result = proxy.Calculate(Operation.Subtract, a, b); break;
                case "Multiply": result = proxy.Calculate(Operation.Multiply, a, b); break;
                case "Divide": result = proxy.Calculate(Operation.Divide, a, b); break;
            }
            Console.WriteLine(result);
            Console.ReadLine();


        }
    }
}
